<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<%@page import="com.zx.platform.service.domain.ManageSessionDomain"%>
<%@page import="com.zx.platform.service.model.OperatorInfoModel"%>
<%
	ManageSessionDomain userinfo = (ManageSessionDomain) request
			.getSession().getAttribute("_LOGONUSER_");
	OperatorInfoModel curOperatorInfo = userinfo.getOperatorInfoModel();
	//如果是代理商，则只显示代理商相关的
%>
<html>
<head>
<TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}" /></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<%@ include file="/jsp/platform/include/header.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		//终端状态
		<common:getDicListByKey key="2040" var="terminalStatusList"/>
	})
	function querySubmit(){
		$("#queryForm").attr("action","<%=request.getContextPath()%>/manage/terminalInfo/terminalList");
		$('#queryForm').submit();
	}
	
	function downloadExcel(){
		$("#queryForm").attr("action","<%=request.getContextPath()%>/manage/terminalInfo/downloadTerminalInfoExcel");
		$('#queryForm').submit();
		$("#queryForm").attr("action","<%=request.getContextPath()%>/manage/terminalInfo/terminalList");
	}
	
	
</script>
</HEAD>
<BODY>
	<DIV class="all">
		<%@ include file="/jsp/platform/include/head.jsp"%>
		<%@ include file="/jsp/platform/include/menu.jsp"%>
		<DIV class="mains">
			<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
				<TBODY>
					<TR valign="top">
						<%@ include file="/jsp/platform/include/mainLeft.jsp"%>
						<TD>
							<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
								<TBODY>
									<TR>
										<TD>
											<TABLE width="180" border="0" cellspacing="0" cellpadding="0">
												<TBODY>
													<TR>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_l.jpg">
														</TD>
														<TD align="center"
															background="<%=request.getContextPath()%>/images/pages_bg.jpg">
															<SPAN class="f_tit1">系统终端查询</SPAN></TD>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_r.jpg">
														</TD>
													</TR>
												</TBODY>
											</TABLE></TD>
									</TR>
								</TBODY>
								<TR>
									<TD>
										<div class="pages_con">
											<FORM name="queryForm" id="queryForm"
												action="<%=request.getContextPath()%>/manage/terminalInfo/terminalList"
												method="post">
												<div class="pages_con_20">

													<div class="transaction_external">
														<DIV class="clearfix">
															<SPAN class="fund-item"><SPAN class="label dl_w"
																style="padding-left:20px;text-align:right;">终端SN：</SPAN>
																<INPUT name="terminalNo" id="terminalNo"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="30"
																value="<c:out value='${model.terminalNo}'/>"></INPUT>
															</SPAN>
															<%
																if ("2".equals(curOperatorInfo.getOperatorType())) {
																} else {
															%>
															<SPAN class="fund-item"><SPAN class="label dl_w"
																style="padding-left:20px;text-align:right;">代理商编号：</SPAN>
																<INPUT name="belongtoAgentSysAccount" id="belongtoAgentSysAccount"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="30"
																value="<c:out value='${model.belongtoAgentSysAccount}'/>"></INPUT>
															</SPAN>
															<%
																}
															%>

															} <SPAN class="fund-item"><select name="terminalStatus"
																id="terminalStatus">
																	<option value="">终端状态</option>
																	<c:forEach var="list" items="${terminalStatusList}">
																		<option value="${list.dirValue}">
																			<c:out value='${list.dirCaption}' />
																		</option>
																	</c:forEach>
															</select>
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="fund-item" style="padding-left:100px;">
																<A class="btn confirm margin_l_10"
																onClick="javascript:querySubmit();"
																href="javascript:void(0);">查询</A> </SPAN> <SPAN
																class="fund-item"> <A
																class="btn confirm margin_l_10"
																onClick="javascript:downloadExcel();"
																href="javascript:void(0);">下载</A> </SPAN>
														</DIV>
													</DIV>
													<br>
														<div class="talbes">
															<table style="text-align: center" width="100%" border="0"
																cellpadding="8" cellspacing="0">
																<tbody>
																	<tr class="talbe_pubs_tr">
																		<td>入库时间</td>
																		<td>终端号</td>
																		<td>绑定商户</td>
																		<td>所属代理</td>
																		<td>绑定时间</td>
																		<td>终端状态</td>
																	</tr>
																	<c:forEach var="model" items="${list}">
																		<tr>
																			<td><fmt:formatDate value="${model.createDate}"
																					pattern="yyyy-MM-dd HH:mm:ss" />
																			</td>
																			<td><c:out value="${model.terminalNo}" />
																			</td>
																			<td><c:out value="${model.merchantSysAccount}" />
																			</td>
																			<td><c:out value="${model.belongAgentSysAccount}" />
																			</td>
																			<td>
																			<c:if test="${model.terminalStatus=='0'}" var="name1">
                                                         					<fmt:formatDate value="${model.bandingDate}"
																					pattern="yyyy-MM-dd HH:mm:ss" />
                                                         					</c:if>
																			</td>
																			<td><common:getDicByCode key="2040"
																					value="${model.terminalStatus}" />
																			</td>
																		</tr>
																	</c:forEach>
																</tbody>
															</table>
															<jsp:include page="/jsp/platform/include/kkpager.jsp"></jsp:include>
														</div>
												</div>
											</FORM>
										</div> <!--当中内容块结束--></TD>
								</TR>
							</TABLE></TD>
					</TR>
				</TBODY>
			</TABLE>
		</DIV>
		<%@ include file="/jsp/platform/include/foot.jsp"%>
		<script type="text/javascript">
			//这句放到页面最后 edit by wenjw 2015.6.2
			$("#terminalStatus").val("<c:out value='${model.terminalStatus}'/>");
		</script>
</BODY>
</HTML>
